#! /bin/bash

setup=${1:-/root/eee-setup}
liveuser=${2:-eeedora}

# TODO : if *xdm or gdm is installed then don't do this...
#displaymanager=`rpm -qa *xdm gdm`

# Here's a better way of doing it...

#if `which gdm 2>/dev/null`; then 
# gdm alternative : 
# ${setup}/xdm/setup-gdm ${setup} ${liveuser}
#else 
if `which xdm 2>/dev/null`; then 
 # xdm alternative :
	${setup}/xdm/setup-xdm ${setup} ${liveuser}
	# NB for pulseaudio to work, need to kick off puslseaudio -D for this user...
else
 # ShowProgress "Autologin ${liveuser} with no password screen"
 ${setup}/xdm/setup-nologin ${setup} ${liveuser}
fi
